﻿@page
@using Microsoft.AspNetCore.Mvc.Localization
@using Volo.Abp.Settings

@inject Volo.Abp.Settings.ISettingProvider SettingProvider
@model ProjectTaskManager.Pages.LoginModel

<style type="text/css">
    html, body {
        height: 100%;
    }

    .container {
        max-width: 100%;
        height: 100%;
    }

    .login-container {
        flex-direction: column;
        box-sizing: border-box;
        display: flex;
        align-items: center;
        height: 100%;
        background: url(../imgs/bg-transparent.png) no-repeat;
        margin: 0;
    }

    .login-content {
        position: absolute;
        top: 20%;
    }

    .form-container {
        width: 380px;
        margin-top: 10px;
    }

    .col-form-label {
        padding-left: 0;
        padding-right: 0;
    }
</style>
<div class="login-content">
    <div class="account-brand text-center">
        <img src="../imgs/app-logo-reverse.png" />
    </div>
    <div class="card shadow-sm rounded form-container">
        <div class="card-body">
            <div class="card-title">登录</div>

            @{Html.BeginForm(FormMethod.Post); }
            @Html.HiddenFor(m => m.ReturnUrl)
            @Html.HiddenFor(m => m.ReturnUrlHash)
            @{
                var labelClass = "col-sm-2 col-form-label text-last-justify";
                var txtClass = "form-control";
            }
            <div class="input-group mb-3">
                @Html.LabelFor(m => m.LoginInput.UserNameOrEmailAddress, new { @class = labelClass })
                <div class="col-sm-10">
                    @Html.TextBoxFor(m => m.LoginInput.UserNameOrEmailAddress, new { @class = txtClass })
                </div>
            </div>
            <div class="input-group mb-3">
                @Html.LabelFor(m => m.LoginInput.Password, new { @class = labelClass })
                <div class="col-sm-10">
                    @Html.PasswordFor(m => m.LoginInput.Password, new { @class = txtClass })
                </div>
            </div>
            <div class="input-group">
                @Html.ValidationMessageFor(m => m.ErrorMessage, null, new { @class = "color-red" })
            </div>
            <div class="input-group">
                <abp-button type="submit" button-type="Primary" class="btn-block btn-lg mt-3">登录</abp-button>
            </div>
            @{Html.EndForm();}
        </div>
    </div>
</div>


